home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 4987 / text0000.txt < prev   
Encoding:
Text File  |  1996-08-05  |  985 b   |  28 lines

  1. Bart.Uyttenhove@ping.be (Bart Uyttenhove) writes:
  2.  
  3. >   CyberScreen = OpenScreenTags(NULL, SA_DisplayID, result, TAG_END);
  4.  
  5. CyberScreen should be a pointer to a screen struct, i.e.:
  6.  
  7. struct Screen *CyberScreen;
  8.  
  9. ...
  10.  
  11. >   result=FillPixelArray(&CyberScreen->RastPort,20,20,300,200,0x00ff0000);
  12.  
  13. However, here you are passing the *address* of this  pointer  (due  to
  14. the  & modifier), dereferenced by the RastPort pointer storage offset,
  15. rather than the address of the structure the pointer is  pointing  to.
  16. You   At   this   stage,  you  could  be  passing  any  value  to  the
  17. FillPixelArray function, and if you run enforcer you'll probably  find
  18. it gives you a long-read hit at $00000054 or something similar.
  19.  
  20. Assuming that CyberScreen has actually been properly declared, then you
  21. need to lose the "&" modifier in any calls using this pointer.
  22.  
  23. -- 
  24.  "Oh yeah? That rabbit couldn't draw flies if he was covered in syrup!"
  25. |-----------------.
  26. | A3000@Indigo.ie |
  27. `-----------------|
  28.